<?php

class dataModel extends Model {

    private $table = '`sd_data`';

    public function add($data) {        
        return $this->_insert($this->table, $data);
    }
    
    public function mlist($memberid){
        return $this->_all("SELECT * FROM `sd_data` where class = 1 and member_id = {$memberid} order by data_id desc");
    }

    public function mlist2($memberid){
        return $this->_all("SELECT * FROM `sd_data` where class = 2 and member_id = {$memberid} order by data_id desc");
    }
    public function mlist3($memberid){
        return $this->_all("SELECT * FROM `sd_data` where class = 3 and member_id = {$memberid} order by data_id desc");
    }
    
    public function mlist4($memberid){
        return $this->_all("SELECT * FROM `sd_data` where class = 4 and member_id = {$memberid} order by data_id desc");
    }

}
